<template>
  <div class="works_list_box">
    <HYTitle title="huigu" />
    <LookList :list="lookList" />
  </div>
</template>

<script lang="ts">
import { defineComponent, onMounted, reactive, ref, toRef, toRefs } from "vue";

import { selectNewsList } from "@/utils/apis/home";
import LookList from "@/components/LookList.vue";
import HYTitle from "@/components/HYTtile.vue";

export default defineComponent({
  name: "LookLists",
  components: {
    LookList,
    HYTitle,
  },
  props: {},
  setup() {
    const state = reactive({
      lookList: [],
    });
    onMounted(async () => {
      const lookList = await selectNewsList({
        page: 1,
        pageSize: 8,
        category: 11,
      });
      state.lookList = lookList.data.list;
    });
    return { ...toRefs(state) };
  },
});
</script>
<style lang="scss" scoped>
.works_list_box {
  padding: 30px 20px;
}
</style>
